import request from '@/utils/request'

// 获取权限列表
export const getPerMsAPI = () => {
  return request('/sys/permission')
}

// 添加权限
export const addPermAPI = (data) => {
  return request(
    {
      url: '/sys/permission',
      method: 'post',
      data
    }
  )
}

// 获取权限详情
export const getPermDetailAPI = (id) => {
  return request('/sys/permission/' + id)
}
// 修改权限
export const assignPermAPI = (data) => {
  return request({
    url: '/sys/permission/' + data.id,
    method: 'put',
    data
  })
}

// 删除权限
export const delPermAPI = (id) => {
  return request({
    url: '/sys/permission/' + id,
    method: 'delete'
  })
}
